BIN = hsion_mLink
OBJS =  main.o
OBJS += util_net.o
OBJS += util_ubus.o
OBJS += util_debug.o
OBJS += util_event.o
OBJS += config.o
LIBS += -luci -lpthread -lcJSON
CFLAGS += -Wall -Os
CFLAGS += -D UCI_DEBUG
INCLUDES = -I. -I./include


all: $(BIN) 

$(BIN): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $@ $(LIBS)
	@echo "make $@ finished on `date`"

%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ $(LIBS)

clean:
	rm -rf $(BIN) $(OBJS)
